import { createApp } from "vue";
import { createPinia } from "pinia";
import ElementPlus, { ElMessage, ElMessageBox } from 'element-plus';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
// import "element-plus/dist/index.css";
import App from "./App.vue";
import router from "./router";
import "@/styles/index.less";
import ImageLazy from './components/ImageLazy.vue';


window.$message = ElMessage; //全局$message。调用：window.$message('消息');
window.$ElMessageBox = ElMessageBox; //全局$message。调用：window.$message('消息');

const app = createApp(App);
const pinia = createPinia();

app.use(pinia);
app.use(router);
app.use(ElementPlus, { zIndex: 3000, locale: zhCn });
// 全局注册图片懒加载组件
app.component('ImageLazy', ImageLazy);
app.mount("#app");
